$('#photo').change(function() {
  var invalue=$('#photo').val();
  var arr=invalue.split('\\');
  var fileName=arr[arr.length-1];
  $('.upload').text(fileName);
})
